<%-- 
    Document   : admin_viewProducts
    Created on : Mar 21, 2014, 4:57:35 PM
    Author     : Dell
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>


<jsp:include page="admin_header.jsp" />

<style>
#ftable
{
background-color:#fff;
text-align:center;
margin: 0 auto;
margin-top:5px;
width:850px;
border-collapse:collapse;
}
#ftable th  td
{
padding:10px;
border: 1px solid black;
}
#ftable th
{
    font-size: 15px;
}



</style>
<!-- body -->
<div class='topblock'>

    <center>Products page</center>
    <center style="color:red;"><% if(null == session.getAttribute("producterror")){}else{out.print(session.getAttribute("producterror").toString());session.setAttribute("producterror", null);} %></center>
	
</div>

<div class='pageblock'>	
	
    <center>
    
        <table border="1" id="ftable">
            
        </table>
        
    </center>
    
</div>

<div id='dim_wrapper' style='
	width:100%;
	height:100%;
	position:fixed;
	top:0;
	left:0;
	z-index:998;
	background-color:#000;
	display:none;
	 '>&nbsp;
</div>



<!--END-->
<script>
    
    function callmeth()
                {
                    if($("#dim_wrapper").css("display") == "none")
                    $("#ftable").load("ServletViewProducts");
                }
    
    $( document ).ready(function() {
        
         
        $("#ftable").load("ServletViewProducts");
        setInterval('callmeth()',5000);    
        
        
        $('#dim_wrapper').click(function(e) {
			$('#dim_wrapper').toggle();
			$("#dim_wrapper").animate({
				'opacity':1.0
			}, 0 );
			
			for(var x=1;x<150;x++)
			 hide_popup("my_popup"+x);
		});
	
		
               
		
		function show_popup(id) {
			if (document.getElementById){
				obj = document.getElementById(id);
				if (obj.style.display == "none") {
					obj.style.display = "";
				}
			}
		}
		function hide_popup(id){
			if (document.getElementById(id)){
				obj = document.getElementById(id);
				if (obj.style.display == ""){
					obj.style.display = "none";
				}
			}
		}
        
});
</script>
<jsp:include page="admin_footer.jsp" />